<?php  
namespace Erp\C\Orders\Tn;
use Erp\C\Orders\Tn\Shipping\Eub;
use Erp\C\Orders\Tn\Shipping\Yw;
use Erp\C\Orders\Tn\Shipping\CF;
use Erp\C\Orders\Tn\Shipping;
use Erp\C;
use Fn;

class ShippingTnCopy{
	private $api='',$type='',$limit=100;

	private $_shippingClsObj = array();
	
	private $_aipType=array(
		'yt','jumia','cndhl','edis','est','hl','ykd','yym','ty','lwe','ubi','tms','gd','kts','ft','ib','gati','dq','ost','dtdc','ispoversea','sp','cp','isp','dsf','yw','ceub','eub','wish','apac','eyb','sfc','cky','lazada','aliexpress','sy','dsfoversea'		
	);
	public function getTnByOrders($ordersId){
		if (!is_array($ordersId)) {
			$ordersId = array($ordersId);
		}
		if (!$ordersId) {
			return false;
		}
		$ordersCopyMdl = A('OrdersCopy');
		$res = $ordersCopyMdl->getOrders($ordersId,false);
		$apiType = $this->_aipType;

		foreach ($res as $k => $v) {
			$shippingCode = $v['orders_shipping_method'];
			// 根据运输方式获取api类型
			$shippingCode = $this->getTypeByCode($shippingCode);
		}
	}
	public function getTypeByCode($shippingCode){
		$res = A('OrdersShippingMethod')->getShippingTypeByCode($shippingCode);
	}
}